<?php /* Smarty version Smarty-3.1.13, created on 2013-09-07 11:25:50
         compiled from ".\templates\transaction.tpl" */ ?>
<?php /*%%SmartyHeaderCode:5335522abfe6592c66-12598892%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '39fb0207c7040c04b5957825aa6c8db0532d08d7' => 
    array (
      0 => '.\\templates\\transaction.tpl',
      1 => 1365220686,
      2 => 'file',
    ),
    '325c040ac3eb2e57c3cb2db39552570ef3cca8a8' => 
    array (
      0 => '.\\templates\\main.tpl',
      1 => 1365255864,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '5335522abfe6592c66-12598892',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    's_activId' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_522abfe68fb406_84883114',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_522abfe68fb406_84883114')) {function content_522abfe68fb406_84883114($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_select_date')) include 'D:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\haremor\\include\\smarty\\libs\\plugins\\function.html_select_date.php';
if (!is_callable('smarty_function_html_options')) include 'D:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\haremor\\include\\smarty\\libs\\plugins\\function.html_options.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
<title>Haremor</title>
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/jquery.autocomplete.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="./css/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="./css/menu.css" rel="stylesheet" type="text/css" />
<link href="./css/jquery.autocomplete.css" rel="stylesheet" type="text/css"/>


<script type="text/javascript">
  $(document).ready(function() {
  	$(".redate").hide();
	  balnace();
	
  $("#partyName").autocomplete("getPartyAj.php", 
	{   
		width: 400,     
		matchContains: true,
		mustMatch: false,
		minChars: 0,
		highlight: false,
		selectFirst: true,
		formatItem: function(data, i, n, value) {   
		  return  value.split("|")[0];
	  }
  }); 
  $("#partyName").result(function(event, data, formatted) {
	  $("#partyId").val(data[1]);
	  balnace();
  });      
});
function balnace()
{
	  var dataString = "partyId=" + $('#partyId').val();
	  $.ajax({
	  type: "GET",
	  url: "balanceAj.php",
	  data : dataString,
	  success:function(data){ 
  	  $('#partyBalance').val(data);
	  }
	 });
}
$('#aimg').click(function()
{
	myFunction();
});
function myFunction()
{
	if(confirm("You Want To Remove This Record")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function remind(radioObj)
{
	if($(radioObj).val() == 'Y')
	{
		$(".redate").show();
	}
	else
	{
		$(".redate").hide();
	}
}
</script>

<script type="text/javascript">
//SuckerTree Horizontal Menu (Sept 14th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/
var menuids=["treemenu1"] //Enter id(s) of SuckerTree UL menus, separated by commas
function buildsubmenus_horizontal()
{
  for (var i=0; i<menuids.length; i++)
  {
    var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++)
    {
  		if(ultags[t].parentNode.parentNode.id==menuids[i])
  		{ //if this is a first level submenu
  			ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item
  			ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon"
		  }
		  else
		  { //else if this is a sub level menu (ul)
  		  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
      	ultags[t].parentNode.getElementsByTagName("a")[0].className="subfoldericon"
		  }
      ultags[t].parentNode.onmouseover=function()
      {
        this.getElementsByTagName("ul")[0].style.visibility="visible"
      }
      ultags[t].parentNode.onmouseout=function()
      {
        this.getElementsByTagName("ul")[0].style.visibility="hidden"
      }
    }
  }
}
if (window.addEventListener)
window.addEventListener("load", buildsubmenus_horizontal, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus_horizontal)

$(function ()
{
	$('.threeToFixed').blur(function()
	{
		applyToFixed($(this));
	});
});

function applyToFixed(obj)
{
	var objValueToFixed = parseFloat($(obj).val());
			$(obj).val(objValueToFixed.toFixed(2));
}
</script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
    <td class="content">
    <?php if (strlen($_smarty_tpl->tpl_vars['s_activId']->value)>0){?>
      <a href="logout.php" class="link">Logout</a> |
      <b>User Name : <?php echo $_smarty_tpl->tpl_vars['s_activId']->value;?>
</b>
    <?php }else{ ?>
      <a href="checkLogin.php" class="link">Login</a>
    <?php }?>
    </td>
  </tr>
  <?php if (strlen($_smarty_tpl->tpl_vars['s_activId']->value)>0){?>
  <tr align="center">
    <td class="bluebg1">
      <div class="suckertreemenu">
      <br />
        <ul id="treemenu1">
	          <li><a href="#" style="width:15px;" class="link">&#2384;</a></li>
	          <li><a href="transaction.php" class="link" align="left">Add Entry</a></li>
	          <li><a href="partyLedger.php" class="link" align="left">Party Ledger</a></li>
	          <li><a href="./party.php" class="link" align="left">Add Party</a></li>
	          <li><a href="./address.php" class="link" align="left">Address Book</a></li>
	          <li><a href="./cityEntry.php" class="link" align="left">City</a></li>
	          <li><a href="./summary.php" class="link" align="left">Summary</a></li>
	          <li><a href="./summary.php?reminders=1" class="link" align="left">Out Of Date</a></li>
        </ul>
      <br /><br /><br />
      </div>
    </td>
  </tr>
  <?php }?>
  <tr>
  <td class="content">
   
<form name="material" action="<?php echo $_SERVER['PHP_SELF'];?>
" method="post">
<table align="center" border="0" cellpadding="2" cellspacing="2" >
<input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['editArray']->value['transactionId'];?>
" name="transactionId">
<tr><td align="center" class="table1" colspan="10">Add Entry</td></tr>
<tr>
	<td align="left" class="table1" colspan="4">Party Name :
		<input type="text" name="partyName" id="partyName" class="partyName" value="<?php echo $_smarty_tpl->tpl_vars['partyNameSelected']->value;?>
" autofocus=autofocus required />
		<input type="hidden" name="partyId" id="partyId" value="<?php echo $_smarty_tpl->tpl_vars['partyIdSelected']->value;?>
" />
	  Balance : <input type="text" name="partyBalance" selected="" id="partyBalance" size="6" READONLY /></td>
	<td align="left" class="table1" colspan="4">
		Transaction Date :<?php echo smarty_function_html_select_date(array('prefix'=>"curDate",'start_year'=>"-8",'end_year'=>"+4",'field_order'=>"DMY",'month_format'=>"%m",'day_value_format'=>"%02d"),$_smarty_tpl);?>

		&nbsp;&nbsp; <br />
		Remind ?
	  <select  name="status" onchange="remind(this);" required />
	    <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['statusArray']->value,'output'=>$_smarty_tpl->tpl_vars['statusOutputArray']->value),$_smarty_tpl);?>

    </select>
    <span class="redate">
		  <?php echo smarty_function_html_select_date(array('prefix'=>"remind",'start_year'=>"-8",'end_year'=>"+4",'field_order'=>"DMY",'month_format'=>"%m",'day_value_format'=>"%02d"),$_smarty_tpl);?>

	  </span>
  </td>
</tr>
<tr>
	<td align="center" class="table1" colspan="2">JAMA</td>
	<td align="center" style="background-color: #008040">&nbsp;&nbsp;</td>
	<td align="center" class="table1" colspan="7">UDHAR</td>
</tr>
<tr>
	<td align="center" class="table1">RUPIYA</td>
	<td align="center" class="table1">VIGAT</td>
	<td align="center" style="background-color: #008040">&nbsp;&nbsp;</td>
	<td align="center" class="table1">RUPIYA</td>
	<td align="center" class="table1">VIGAT</td>
	<td align="center" class="table1">VAJAN</td>
	<td align="center" class="table1" colspan="4">BHAV</td>
</tr>
<tr>
	<td align="center" class="table1"><input type="text" name="jamaRupiya" id="jamaRupiya" value="<?php echo $_smarty_tpl->tpl_vars['editArray']->value['jamaRupiya'];?>
" class="jamaRupiya " /></td>
	<td align="center" class="table1"><input type="text" name="jamaVigat"  id="jamaVigat"  value="<?php echo $_smarty_tpl->tpl_vars['editArray']->value['jamaVigat'];?>
" class="jamaVigat" /></td>
	<td align="center" style="background-color: #008040">&nbsp;&nbsp;</td>
	<td align="center" class="table1"><input type="text" name="udhaarRupiya" id="udhaarRupiya" value="<?php echo $_smarty_tpl->tpl_vars['editArray']->value['udhaarRupiya'];?>
" class="udhaarRupiya " /></td>
	<td align="center" class="table1"><input type="text" name="udhaarVigat"  id=" "  value="<?php echo $_smarty_tpl->tpl_vars['editArray']->value['udhaarVigat'];?>
" class="udhaarVigat" /></td>
	<td align="center" class="table1"><input type="text" name="udhaarVajan"  id="udhaarVajan"  value="<?php echo $_smarty_tpl->tpl_vars['editArray']->value['udhaarVajan'];?>
" class="udhaarVajan " /></td>
	<td align="center" class="table1" colspan="4"><input type="text" name="udhaarBhav"   id="udhaarBhav"   value="<?php echo $_smarty_tpl->tpl_vars['editArray']->value['udhaarBhav'];?>
" class="udhaarBhav " /></td>
</tr>
<tr>
	<td align="center" class="table1" colspan="10">
		<input type="submit" name="submitBtn" value=" SAVE " />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="reset" value=" CANCEL " />
	</td>
</tr>
</table>
</form>
<h2 align="center">Entry List </h2>
<table  border='2' align="center">
<tr>
	<th class="table1">&nbsp;</th>
	<th class="table1">&nbsp;</th>
	<th class="table1">Party Name</th>
	<th class="table1">Jama Rupiya</th>
	<th class="table1">Jama Vigat</th>
	<th class="table1">Udhaar Rupiya</th>
	<th class="table1">Udhaar Vigat</th>
	<th class="table1">Udhaar Vajan</th>
	<th class="table1">Udhaar Bhav</th>
	</tr>
<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['name'] = "sec";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['transactionArray']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total']);
?>
<tr>
	<td class="table2"><a id="aimg" href="transaction.php?transactionId=<?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['transactionId'];?>
&partyId=<?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['partyId'];?>
" class="link" onclick="return balnace();"><img src="./images/edit.gif"></a></td>
	<td class="table2" align="center">
	  <a href="transDelete.php?transactionId=<?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['transactionId'];?>
" onclick="return myFunction();" class="link"><img src="./images/deleteIcon.png" height="20px" width="20px"></a>
	</td>
	<td class="table2" align="left"><?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['partyName'];?>
</td>
	<td class="table2" align="right"><?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['jamaRupiya'];?>
</td>
	<td class="table2" align="left"><?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['jamaVigat'];?>
</td>
	<td class="table2" align="right"><?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['udhaarRupiya'];?>
</td>
	<td class="table2" align="left"><?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['udhaarVigat'];?>
</td>
	<td class="table2" align="right"><?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['udhaarVajan'];?>
</td>
	<td class="table2" align="right"><?php echo $_smarty_tpl->tpl_vars['transactionArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['udhaarBhav'];?>
</td>
</tr>
<?php endfor; endif; ?>
</table>

  </td>
  </tr>
  <tr>
    <td class="bluebg1">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/corner3.gif" width="6" height="7" /></td>
        <td></td>
        <td align="right"><img src="images/corner4.gif" width="6" height="7" /></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
</body>
</html><?php }} ?>